/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.uml_generator.bean.impl;

import java.io.File;
import java.net.URL;

import com.genia.toolbox.uml_generator.bean.GenerationConfiguration;

/**
 * simple implementation of {@link GenerationConfiguration}.
 */
public class GenerationConfigurationImpl
    implements GenerationConfiguration
{

  /**
   * the name of the package that must contains the configuration files.
   */
  private String configurationPackage;

  /**
   * the arrays containing the locales to generate beside the default.
   */
  private String[] locales;

  /**
   * the array of {@link File} containing the xmi definitions of the classes to
   * generate.
   */
  private File[] xmiFiles;

  /**
   * the {@link File} containing the directory where the generated sources must
   * be written.
   */
  private File generatedSrcDir;

  /**
   * the {@link File} containing the directory where the generated resources
   * must be written.
   */
  private File generatedResourcesDir;

  /**
   * the {@link File} containing the directory where the persistent sources must
   * be written.
   */
  private File srcDir;

  /**
   * the {@link File} containing the directory where the persistent resources
   * must be written.
   */
  private File resourcesDir;

  /**
   * the {@link URL} to the Jalopy configuration.
   */
  private URL jalopyConfiguration;

  /**
   * the prefix to add to fields/tables and all element created in the database.
   */
  private String dbElementPrefix = "t_";

  /**
   * the max size of an identifier length for the DB.
   */
  private int maxDbIdentifierLength = 30;

  /**
   * getter for the configurationPackage property.
   * 
   * @return the configurationPackage
   */
  public String getConfigurationPackage()
  {
    return configurationPackage;
  }



  /**
   * getter for the generatedResourcesDir property.
   * 
   * @return the generatedResourcesDir
   */
  public File getGeneratedResourcesDir()
  {
    return generatedResourcesDir;
  }



  /**
   * getter for the generatedSrcDir property.
   * 
   * @return the generatedSrcDir
   */
  public File getGeneratedSrcDir()
  {
    return generatedSrcDir;
  }



  /**
   * getter for the jalopyConfiguration property.
   * 
   * @return the jalopyConfiguration
   */
  public URL getJalopyConfiguration()
  {
    return jalopyConfiguration;
  }



  /**
   * getter for the locales property.
   * 
   * @return the locales
   */
  public String[] getLocales()
  {
    return locales;
  }



  /**
   * getter for the resourcesDir property.
   * 
   * @return the resourcesDir
   */
  public File getResourcesDir()
  {
    return resourcesDir;
  }



  /**
   * getter for the srcDir property.
   * 
   * @return the srcDir
   */
  public File getSrcDir()
  {
    return srcDir;
  }



  /**
   * getter for the xmiFiles property.
   * 
   * @return the xmiFiles
   */
  public File[] getXmiFiles()
  {
    return xmiFiles;
  }



  /**
   * setter for the configurationPackage property.
   * 
   * @param configurationPackage
   *          the configurationPackage to set
   */
  public void setConfigurationPackage(String configurationPackage)
  {
    this.configurationPackage = configurationPackage;
  }



  /**
   * setter for the generatedResourcesDir property.
   * 
   * @param generatedResourcesDir
   *          the generatedResourcesDir to set
   */
  public void setGeneratedResourcesDir(final File generatedResourcesDir)
  {
    this.generatedResourcesDir = generatedResourcesDir;
  }



  /**
   * setter for the generatedSrcDir property.
   * 
   * @param generatedSrcDir
   *          the generatedSrcDir to set
   */
  public void setGeneratedSrcDir(final File generatedSrcDir)
  {
    this.generatedSrcDir = generatedSrcDir;
  }



  /**
   * setter for the jalopyConfiguration property.
   * 
   * @param jalopyConfiguration
   *          the jalopyConfiguration to set
   */
  public void setJalopyConfiguration(URL jalopyConfiguration)
  {
    this.jalopyConfiguration = jalopyConfiguration;
  }



  /**
   * setter for the locales property.
   * 
   * @param locales
   *          the locales to set
   */
  public void setLocales(String[] locales)
  {
    this.locales = locales;
  }



  /**
   * setter for the resourcesDir property.
   * 
   * @param resourcesDir
   *          the resourcesDir to set
   */
  public void setResourcesDir(final File resourcesDir)
  {
    this.resourcesDir = resourcesDir;
  }



  /**
   * setter for the srcDir property.
   * 
   * @param srcDir
   *          the srcDir to set
   */
  public void setSrcDir(final File srcDir)
  {
    this.srcDir = srcDir;
  }



  /**
   * setter for the xmiFiles property.
   * 
   * @param xmiFiles
   *          the xmiFiles to set
   */
  public void setXmiFiles(File[] xmiFiles)
  {
    this.xmiFiles = xmiFiles;
  }



  /**
   * getter for the dbElementPrefix property.
   * 
   * @return the dbElementPrefix
   */
  public String getDbElementPrefix()
  {
    return dbElementPrefix;
  }



  /**
   * setter for the dbElementPrefix property.
   * 
   * @param dbElementPrefix
   *          the dbElementPrefix to set
   */
  public void setDbElementPrefix(String dbElementPrefix)
  {
    this.dbElementPrefix = dbElementPrefix;
  }



  /**
   * getter for the maxDbIdentifierLength property.
   * @return the maxDbIdentifierLength
   */
  public int getMaxDbIdentifierLength()
  {
    return maxDbIdentifierLength;
  }



  /**
   * setter for the maxDbIdentifierLength property.
   * @param maxDbIdentifierLength the maxDbIdentifierLength to set
   */
  public void setMaxDbIdentifierLength(int maxDbIdentifierLength)
  {
    this.maxDbIdentifierLength = maxDbIdentifierLength;
  }

}
